<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ taglib uri="http://www.ld.com/system/tags" prefix="system"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<%-- 权限判断 --%>
<shield:permssion type="button">
<form action="${ctxPathA}/system/noticeaction/addOrUpdate" method="post" autocomplete="off" class="show-info">
	<shield:token/>
    <input id="id" name="id" type="hidden" maxlength="100" value="${model.id }">
    <table class="tab-show">
    	<colgroup>
    		<col width="200">
    		<col width="">
    	</colgroup>
<c:if test="${not empty actionSet }">
		<tr>
	    	<th>
            	<label>识别码（表名等）：</label>
        	</th>
         	<td><input type="text" name="keyCode" value="${keyCode}" readonly="readonly"></td>
		<tr>
        <tr>
	    	<th>
            	<label>识别码的主键（表id）
            	<!-- qtips提示，shieldSettings设置options，所有的属性都可以配置在此 data-title设置标题【非必需】，data-cont设置内容【必需】，data-qtips-class设置样式【非必需】，data-qtips-class=yellow表示取内置的黄色样式【黄色、有阴影、圆角】，也可以写完整的样式qtip-yellow qtip-shadow qtip-rounded  -->
            	<img src="${ctxPath }/images/icon/question.png?20190319105451" class="qtips" shieldSettings="{position:{'my':'bottom left','at':'top center'}}" data-title="说明" data-cont="如果识别码设置为表名，则该值一般设置为表的id(主键)，不设置表示这个表下的所有通知都一样。" style="cursor: pointer;" data-qtips-class="yellow" >
            	：</label>
        	</th>
         	<td><input type="text" name="pkey" value="${pkey}" readonly="readonly"></td>
		<tr>
</c:if>
<c:if test="${empty actionSet }">
        <tr>
	    	<th>
            	<label><font color="red">*</font>识别码（表名等）：</label>
        	</th>
         	<td><input type="text" name="keyCode" value="${model.keyCode}"></td>
		</tr>
        <tr>
	    	<th>
            	<label><font color="red">*</font>识别码下属的主键（表id）：</label>
        	</th>
         	<td><input type="text" name="pkey" value="${model.pkey}"></td>
		</tr>
</c:if>
        <tr>
	    	<th>
            	<label><font color="red">*</font>名称：</label>
        	</th>
         	<td><input type="text" name="name" value="${model.name}"></td>
		</tr>
        <tr>
	    	<th>
            	<label><font color="red">*</font>标题：</label>
        	</th>
         	<td><input type="text" name="title" value="${model.title}"></td>
		</tr>
        <tr>
	    	<th>
            	<label>内容：</label>
        	</th>
         	<td>
         		<textarea name="content" class="" style="width:100%;" maxlength="400">${model.content}</textarea>
         	</td>
		</tr>
        <tr>
	    	<th>
            	<label><font color="red">*</font>通知类型：</label>
        	</th>
         	<td>
<c:forEach items="${noticeTypes}" var="notice">
				<input class="check" type="checkbox" name="type" value="${notice.key}" ${fn:contains(model.type, notice.key)?'checked':'' }/>${notice.value.name}
</c:forEach>
         	</td>
		</tr>
        <tr>
	    	<th>
            	<label>发送给用户：</label>
        	</th>
         	<td><input type="text" name="sendTo" value="${model.sendToUser}"></td>
		</tr>
		<tr>
	    	<th>
            	<label>发送给群组：</label>
        	</th>
         	<td><input type="text" name="sendTo" value="${model.sendToGroup}"></td>
		</tr>
		<tr>
	    	<th>
            	<label><font color="red">*</font>状态：</label>
        	</th>
         	<td><input class="radio" type="radio" name="state" value="0" ${model.state == 0?'checked':''}>启用<input class="radio" type="radio" name="state" value="2" ${model.state == 2?'checked':''}>停用</td>
		</tr>
    </table>
    <div class="taCenter">
		<input class="button" type="submit" value="提交"/>
    	<input class="button default" type="reset" value="重置"/>
    </div>
</form>
</shield:permssion>
